﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Frame.master" AutoEventWireup="true" CodeFile="plateType.aspx.cs" Inherits="plateType" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleHolder" Runat="Server">
    <asp:Label ID="lblTitle" runat="server" Text="Quản lý loại xe"></asp:Label>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentHolder" Runat="Server">
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <ContentTemplate>
   
<table width="930" border="0" align="center" cellpadding="3" cellspacing="1" class="margin_l150">
        <tr>
            <td align="left" valign="top" width="100">
                Loại xe</td>
            <td align="left" valign="top">
                <asp:TextBox ID="txtName" runat="server" CssClass="width_200" 
                    MaxLength="50" Enabled="False" ReadOnly="True"></asp:TextBox>
&nbsp;</td>
        </tr>
         <tr>
            <td align="left" valign="top" width="100">
                Giá</td>
            <td align="left" valign="top">
                <asp:TextBox ID="txtPrice" runat="server" CssClass="width_200" MaxLength="50"></asp:TextBox>
                 &nbsp;<asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" 
                    ControlToValidate="txtPrice" CssClass="errorMsg" Display="Dynamic" 
                    SetFocusOnError="True"></asp:RequiredFieldValidator>
                <asp:RegularExpressionValidator ID="errFrom" runat="server" 
                                            ControlToValidate="txtPrice" Display="Dynamic" 
                                            ErrorMessage="Chỉ chấp nhận giá trị số" ValidationExpression="([1-9]{1}[0-9]{0,2}(\,[0-9]{3})*(\.[0-9]{0,2})?|[1-9]{1}[0-9]{0,}(\.[0-9]{0,2})?|0(\.[0-9]{0,2})?|(\.[0-9]{1,2})?)$"
                    SetFocusOnError="True" CssClass="errorMsg" />
            </td>
        </tr>
        <tr>
            <td align="left" valign="top">
                Mô tả</td>
            <td align="left" valign="top">
                <asp:TextBox ID="txtDes" runat="server" CssClass="width_200" 
                    TextMode="MultiLine" MaxLength="100" Rows="3"></asp:TextBox>

                   
            </td>
        </tr>
        <tr>
            <td align="left" valign="top">
                &nbsp;
                <asp:HiddenField ID="hdnId" runat="server" />
            </td>
            <td align="left" valign="top">
            <asp:ImageButton ID="btnSave" runat="server" ImageUrl="~/images/edit.jpg" OnClick="btnSave_Click" />
                </td>
             
        </tr>
    </table>
    
    <div align="center"> <asp:Label ID="lblMsg" runat="server" ForeColor="#FF3300"></asp:Label></div>
        
     <table width="600" border="0" cellpadding="0" cellspacing="0" class="margin_b5 margin_l100">
        <tr>
            <td class="titleInfo">
                Danh sách loại xe
            </td>
        </tr>
    </table>
    <div align="center" style="width:600px"> <asp:Label ID="lblInform" runat="server" ForeColor="#FF3300"></asp:Label></div>
     <asp:Repeater ID="rptPlate" runat="server" onitemcommand="rptPlate_ItemCommand" 
            EnableViewState="false" onitemdatabound="rptPlate_ItemDataBound">
        <HeaderTemplate>
            <table width="600" border="0" align="left"  cellpadding="5" cellspacing="1" class="margin_l100 tableBackground">
                    <tr>
                        <td class="tableheader" width="20"><b>STT</b></td>
                        <td width="150" align="center" class="tableheader"><b>Loại xe</b></td>
                        <td width="80" align="center" class="tableheader"><b>Giá(VNĐ)</b></td>
                        <td align="left" class="tableheader"><b>Mô tả</b></td>
                      <%--  <td width="180" align="center" class="tableheader"><b>Người cập nhật sau cùng</b></td>--%>
                        <td width="60"  align="center" class="tableheader"><b>Thao tác</b></td>
                    </tr>
        </HeaderTemplate>
        <ItemTemplate>
            <tr class="tableContentEven">
                <td align="center"><asp:Label ID="lblNo" runat="server" Text="<%# Container.ItemIndex + 1 %>"></asp:Label></td>
                <td align="left" valign="top"><%#Eval("Name")%></td>
                <td align="right" valign="top"><%#Eval("Price")%></td>
                <td align="left" valign="top"><%#Eval("Description")%></td>
                <%-- <td  align="left" valign="top"><%#Eval("LastUser.FirstName")%> <%#Eval("LastUser.LastName")%></td> --%>
                <td align="center" valign="top">
                <asp:ImageButton CausesValidation="false" ID="btnEdit"  runat="server" ImageUrl="~/images/edit.png" ToolTip="Chỉnh sửa" Width="14" Height="13" CommandName="Edit" CommandArgument='<%#Eval("Id")%>'/>
                </td>               
              <%--  <td width="30" align="center" valign="top">
                    <asp:ImageButton CausesValidation="false" ID="btnDelete" OnClientClick="return confirm('Bạn chắc chắn muốn xóa?')" ImageUrl="~/images/delete.gif" ToolTip="Xóa" runat="server" CommandName="Delete" CommandArgument='<%#Eval("Id")%>'/>
                    <asp:HiddenField ID="hdnId" runat="server" Value='<%#Eval("Id")%>'/>                   
                </td>--%>
            </tr>
        </ItemTemplate>
        <FooterTemplate>
        </table>
        </FooterTemplate>
    </asp:Repeater>
    </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>

